<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link href="../../css/index.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../js/jquery-1.8.3.js"></script>
<script type="text/javascript">
	$(function() {
		$("#query").click(function() {
			$("[name='pageNum']").val(1);
			$("form:first").submit();
		});
	});
	function showMsg(msg,uuid){
		top.$('context-msg').style.display = "block";
		top.$('context-msg-text').innerHTML=msg;
		top.$('hid-action').value="actionName";
		top.lock.show();
	}
	
	
</script>
<jsp:include page="/common/css.jsp"></jsp:include>
<jsp:include page="/common/header.jsp"></jsp:include>
	
		<jsp:include page="/common/top.jsp"></jsp:include>
	<div class="content">
		<jsp:include page="/common/left.jsp"></jsp:include>
		<div class="mainbar">
			<jsp:include page="/common/top_title.jsp"></jsp:include>
		
				<div class="widget-head">
                  <div class="pull-left">供应商管理</div>
                  <div class="widget-icons pull-right">
                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                  </div>
                  <div class="clearfix"></div>
                </div>
        <div class="widget-content">
                  <div class="padd">      
	<!-- <div class="content-text"> -->
		<form action="${pageContext.request.contextPath }/findSuppliers.action" method="post">
			<!-- <div class="square-o-top"> -->
				<table width="100%" border="0" cellpadding="0" cellspacing="0"
					style="font-size:14px; font-weight:bold; font-family:"黑体";">
					<tr>
						<td width="28%" height="30">&nbsp;</td>
						<td width="8%">供应商:</td>
						<td width="17%"><input type="text" name="name" size="18" /></td>
						<td width="8%">联系人:</td>
						<td width="17%"><input type="text" name="contact" size="18" /></td>
						<td width="12%">
							<input type="submit" value="查询"></td>
					</tr>
					<tr>
						<td height="30">&nbsp;</td>
						<td>电话:</td>
						<td><input type="text" name="tele" size="18" /></td>
						<td>提货方式：</td>
						<td>
							<select class="kuan" name="needs">
								<option value="">----请-选-择----</option>
								<option value="1">送货</option>
								<option value="0">自提</option>
							</select>
						</td>
						<td>
							<a href="./input.jsp"><img	src="../../images/can_b_02.gif" border="0" /> </a></td>
					</tr>
				</table>
				</form>
			</div>
			
			<!--"square-o-top"end-->
			<div class="square-order">
				<table width="100%" border="1" cellpadding="0" cellspacing="0" id="tab">
					<tr align="center"
						style="background:url(../../images/table_bg.gif) repeat-x;">
						<td width="20%" height="30">供应商</td>
						<td width="20%">地址</td>
						<td width="20%">联系人</td>
						<td width="12%">电话</td>
						<td width="12%">送货方式</td>
						<td width="16%">操作</td>
					</tr>
					<c:forEach items="${list }" var="list">
					<tr align="center" bgcolor="#FFFFFF">
						<td width="13%" height="30">${list.name }</td>
						<td>${list.address }</td>
						<td>${list.contact }</td>
						<td>${list.tele }</td>
						<td>
						<c:if test="${list.needs==1 }">
							送货
						</c:if>
						<c:if test="${list.needs==0 }">
							自提
						</c:if>
						</td>
						<td>
							<img src="../../images/icon_3.gif" /> 
							<span style="line-height:12px; text-align:center;"> 
								<a href="${pageContext.request.contextPath }/findById.action?uuid=${list.uuid }" class="xiu">修改</a>
							</span> 
							<img src="../../images/icon_04.gif" /> 
							<span style="line-height:12px; text-align:center;"> 
								<a href="${pageContext.request.contextPath }/delSupplier.action?uuid=${list.uuid}" >删除</a>
							</span>
						</td>
					</tr>
					</c:forEach>
				</table>
			</div>
		
	</div>

		</div>
			<div class="content-bbg"></div>
</div>
			
		<jsp:include page="/common/buttom.jsp"></jsp:include>
	</div>
		<jsp:include page="/common/js.jsp"></jsp:include>